package com.iknight.theory.api;

import com.iknight.theory.model.SegPowerInfo;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
/**
 * @author JeryZym
 * @date 2018/2/2
 */
public interface TheoryCalService {
    /**
     * 校验档案
     *
     * @param tranId
     * @return
     */
    Object validateArchive(String tranId, String code);

    /**
     * @param lineId
     * @param code
     * @param msg
     * @return
     */
    Object checkLineSeg(String lineId, String code, String msg);

    /**
     * @param tranId
     * @param code
     * @param msg
     * @return
     */
    Object checkLine(String tranId, String code, String msg);

    /**
     * @param lineId
     * @param code
     * @param msg
     * @return
     */
    Object checkConsLine(String lineId, String code, String msg);

    /**
     * @param lineId
     * @param code
     * @param msg
     */
    Object checkCons(String lineId, String code, String msg);

    /**
     * 计算三相不平衡度
     *
     * @param tran_id
     * @return
     */
    Object calThreePhaseUnbalance(String tran_id);

    /**
     * 计算单相电流
     *
     * @param tranPower
     * @param tranPowerFacotr
     * @param avgVolt
     * @param calCycle
     * @return
     */
    BigDecimal calSinglePhaseCurrent(BigDecimal tranPower, BigDecimal tranPowerFacotr, BigDecimal avgVolt, BigDecimal calCycle);

    /**
     * 计算分段电量
     *
     * @param recordId
     * @param segls
     * @param code
     * @return
     */
    Object calSegsPower(String recordId, List<?> segls, String code);

    /**
     * @param consLinels
     * @param consPowerls
     * @return
     */
    Object analyzeLinePoles(List<Map> consLinels, List<Map> consPowerls);

    /**
     *
     * @param bdTranPower
     * @param bdConsPower
     * @param segls
     * @param lineSegPowerInfols
     * @return
     */
    Object analyzeLineSegsPower(BigDecimal bdTranPower, BigDecimal bdConsPower, List<Map> segls, List<SegPowerInfo> lineSegPowerInfols);
    /**
     * 计算线损率
     *
     * @param powerLoss
     * @param powerTotal
     * @return
     */
    BigDecimal calLossRate(BigDecimal powerLoss, BigDecimal powerTotal);

    /**
     * 计算负荷曲线特性系数
     * @param bdFrontAvgCurrent
     * @param bdLoadAvgCurrent
     * @param bdMax
     * @return
     */
    BigDecimal calLoadCurseIndex(BigDecimal bdFrontAvgCurrent,BigDecimal bdLoadAvgCurrent,BigDecimal bdMax);
}
